home *** CD-ROM | disk | FTP | other *** search
-
- This program, originally written for compilation in and use with
- Microsoft's C compiler, version 5.0, has been revised and ported to
- TurboC -- but NOT for compilation in MSC 4.0. It can be used with
- MSC, version 4.0 or 5, as well, if the defaults are overriden in an
- appropriate makemak.cfg file tailored to the MSC environment. This,
- however, will be imperfect since each compiler command line should end
- with a semicolon for 'msc.exe.' The reason for compiling in TC,
- rather than MSC 4.0 (which I also have), is that the program relies on
- the findfirst()/findnext() ANSI-C calls. TC has them; MSC 4.0 does
- not.
-
- ADDENDA TO INSTRUCTIONS:
-
- 1. The command to generate a makefile named "makefile", which
- specifies a target file to be made named "target.exe" is:
-
- makemake target.exe > makefile
-
- The name target.exe (or whatever else you specify) will be used within
- the generated makefile. And, without redirection, the makefile to be
- generated will be displayed on the screen, but no file will be created.
-
- To use this makefile, you must invoke TC's somewhat brain-damaged 'make'
- capability -- which is not quite as bad as Microsoft's! -- with the
- command:
-
- make target.exe
-
- 2. Note that the makemak.cfg file can be located in any directory
- specified by the PATH environment variable. The program will search for
- it along the PATH.
-
- 3. Note that the makemak.cfg file contains full paths to the
- library and include files, consistent with my file structure. Vary
- these as appropriate. The key point is that all of the library files
- required by TC's tlink are specified: the c0x.obj file that must be
- linked with your .obj files, and the emu.lib mathx.lib and cx.lib
- libraries that must be linked in. Note also that the small model is
- specified in makemak.cfg. This can (and should) be varied as
- appropriate.
-
-
- CHANGES:
-
- The excessive link command line problem is solved. The program
- automatically generates a file named "linkfile" when run, which file
- contains the names of the .obj files to be linked together. The program
- then looks at the length of this file. If it is 50 bytes (characters)
- or more in length, the link instruction generated in the makefile is:
-
- $(LINK) $(L_OPTS) @linkfile, $(TARGET), $(LMAP), $(LIBS)
-
- i.e., it will look to the linkfile for the list of .obj files to be
- linked together. If it is 49 characters or less in length, the link
- instruction generated in the makefile is:
-
- $(LINK) $(L_OPTS) $(OBJS), $(TARGET), $(LMAP), $(LIBS)
-
- i.e., the list of .obj files will be expanded to the link command line.
-
- 50 characters was chosen as the boundary because tlink seemingly can
- take up to 128 characters of arguments, and some 60 of these are
- consumed with the overhead of the files that must be linked with any
- TurboC-generated .objs (if reasonably full paths are specified to them).
-
- However, to hedge the bet, in case the 50 character boundary is wrong,
- the alternate link instruction is generated in the makefile in each
- case, preceeded by a comment indicator (#). (Some DOS 'make' commands
- will properly ignore a commented line; others will not, but will
- continue after an error indication. If it is annoying, simply delete
- the unnecessary line later.) So, if the link line bombs because it is
- too long, just comment out the existing link instruction and uncomment
- the alternate. This takes care of two possibilities: (a) where you
- have shorter paths to the libraries, and can include more .obj files
- on the tlink (or Microsoft link) command line; and (b) where you have
- longer paths to the libraries, and cannot take 49 characters of .obj
- files on the linker command line.
-
- mike2@lcuxa
-